/*
 ============================================================================
 Name		: FEAppContainer.h
 Author	  : jk
 Copyright   : Your copyright notice
 Description : Declares Container class for application.
 ============================================================================
 */

#ifndef __FEAPPDRIVERCONTAINER_h__
#define __FEAPPDRIVERCONTAINER_h__

// INCLUDES
#include <coecntrl.h> 
#include <aknlists.h>
#include <f32file.h>
#include "FEAppDriverView.h"

// CLASS DECLARATION
class CFEAppDriverContainer : public CCoeControl, MEikListBoxObserver
{
public:
	// New methods

	/**
	 * NewL.
	 * Two-phased constructor.
	 * Create a CFEAppDriverContainer object, which will draw itself to aRect.
	 * @param aRect The rectangle this Container will be drawn to.
	 * @return a pointer to the created instance of CFEAppDriverContainer.
	 */
	static CFEAppDriverContainer* NewL(const TRect& aRect);

	/**
	 * NewLC.
	 * Two-phased constructor.
	 * Create a CFEAppDriverContainer object, which will draw itself
	 * to aRect.
	 * @param aRect Rectangle this Container will be drawn to.
	 * @return A pointer to the created instance of CFEAppDriverContainer.
	 */
	static CFEAppDriverContainer* NewLC(const TRect& aRect);

	/**
	 * ~CFEAppDriverContainer
	 * Virtual Destructor.
	 */
	virtual ~CFEAppDriverContainer();

public:
	// Functions from base classes

	/**
	 * From CCoeControl, Draw
	 * Draw this CFEAppDriverContainer to the screen.
	 * @param aRect the rectangle of this Container that needs updating
	 */
	void Draw(const TRect& aRect) const;

	/**
	 * From CoeControl, SizeChanged.
	 * Called by framework when the Container size is changed.
	 */
	virtual void SizeChanged();

	/**
	 * From CoeControl, HandlePointerEventL.
	 * Called by framework when a pointer touch event occurs.
	 * Note: although this method is compatible with earlier SDKs, 
	 * it will not be called in SDKs without Touch support.
	 * @param aPointerEvent the information about this event
	 */
	virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);

	TInt CountComponentControls() const;
	CCoeControl* ComponentControl(TInt aIndex) const;
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
	void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
	TInt64 GetDriveInfo(TInt, RFs&);
	void GetSelectedDriveString(TInt index, TDes8& path);
	TInt GetSelectedIndex();
	TPtrC GetSelectedItems(TInt);
	CAknDoubleLargeStyleListBox *GetListBoxCtrl();
	void SetView(CFEAppDriverView *aView);
	void TransSize(TInt64 aSize, TDes &aBuf);
private:
	// Constructors

	/**
	 * ConstructL
	 * 2nd phase constructor.
	 * Perform the second phase construction of a
	 * CFEAppDriverContainer object.
	 * @param aRect The rectangle this Container will be drawn to.
	 */
	void ConstructL(const TRect& aRect);

	/**
	 * CFEAppDriverContainer.
	 * C++ default constructor.
	 */
	CFEAppDriverContainer();

	CAknDoubleLargeStyleListBox *iListbox;

	//TInt iSelectedIndex;

	CFEAppDriverView *iView;

};

#endif // __FIEAPPContainer_h__
// End of File
